<template>
  <v-data-table
      :headers="headers"
      :items="desserts"
      class="elevation-1"
      disable-sort
      hide-default-footer
  >
    <!--          <template v-slot:item.calories="{ item }">-->
    <!--            <v-chip-->
    <!--                :color="getColor(item.calories)"-->
    <!--                dark-->
    <!--            >-->
    <!--              {{ item.calories }}-->
    <!--            </v-chip>-->
    <!--          </template>-->
    <template v-slot:[`item.rank`]="{ index }">
      <div class="mt-6 mb-6">
        <img style="height: 40px" v-if="index < 3" :src="rank_img[index]">
        <h3 v-else>{{ index + 1 }}</h3>
      </div>
    </template>
  </v-data-table>
</template>

<script>
export default {
  name: "ConferenceRank",
  data () {
    return {
      rank_img: [
          "https://originalfileserver.aminer.cn/sys/aminer/ranking/ranking_rank_first.png",
          "https://originalfileserver.aminer.cn/sys/aminer/ranking/ranking_rank_sen.png",
          "https://originalfileserver.aminer.cn/sys/aminer/ranking/ranking_rank_third.png"
      ],
      headers: [
        {
          text: '排名',
          align: 'center',
          value: 'rank'
        },
        {
          text: '会议名称（全称）',
          align: 'center',
          value: 'fullname',
        },
        {
          text: '简称',
          value: 'shortname',
        },
        { text: 'Map', value: 'map' },
        { text: 'CCF等级', value: 'level' },
      ],
      desserts: [
        {
          fullname: 'IEEE Conference on Computer Vision and Pattern Recognition',
          shortname: 'CVPR',
          map: 0.14,
          level: 'A'
        },
        {
          fullname: 'Annual Conference on Neural Information Processing Systems',
          shortname: 'NeurIPS',
          map: 0.08,
          level: 'A'
        },
        {
          fullname: 'International Conference on Computer Vision',
          shortname: 'ICCV',
          map: 0.01,
          level: 'A'
        },
        {
          fullname: 'International Conference on Machine Learning',
          shortname: 'ICML',
          map: 0.09,
          level: 'A'
        },
        {
          fullname: 'European Conference on Computer Vision',
          shortname: 'ECCV',
          map: 0.26,
          level: 'B'
        },
        {
          fullname: 'AAAI Conference on Artificial Intelligence',
          shortname: 'AAAI',
          map: 0.04,
          level: 'A'
        },
        {
          fullname: 'Bioinformatics',
          shortname: '——',
          map: '——',
          level: 'B'
        },
        {
          fullname: 'Annual Meeting of the Association for Computational Linguistics',
          shortname: 'ACL',
          map: 0.04,
          level: 'A'
        },
        {
          fullname: 'IEEE Transactions on Image Processing',
          shortname: 'TIP',
          map: 0.28,
          level: 'A'
        },
        {
          fullname: 'IEEE Transactions on Wireless Communications',
          shortname: 'TWC',
          map: 0.20,
          level: 'B'
        },
      ],
    }
  },
}
</script>

<style lang="scss" scoped>
.bold {
  font-weight: bold;
}
</style>